home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / BBS / EZY120_1.ZIP / STRUCT.ARJ / CLIB.ARJ / STR4.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-09  |  349 b   |  20 lines

  1.  
  2. #include <ezylib.h>
  3. #include <string.h>
  4.  
  5. char *TrimTrail(char *S)
  6. {
  7.   int SLen = strlen(S);
  8.   if (SLen > 0) {
  9.     int Found = FALSE;
  10.     int Loop = SLen + 1;
  11.     while ((Loop > 0) && (!Found)) {
  12.       if ((S[Loop-1] != ' ') && (S[Loop-1] != 0x08)) {
  13.         S[Loop] = 0x00;
  14.         Found = TRUE;
  15.       }
  16.     }
  17.   }
  18.   return(S);
  19. }
  20.